<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page isELIgnored="false"%>
<%@ include file="../common/taglibs.jsp"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

<title>POS收单运营管理平台</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<title>云商宝商户变更记录</title>
<link rel="icon" href="favicon.ico" type="image/x-icon" />
<!-- 当前页面样式 -->
<link rel="stylesheet" href="<s:url value="/css/common.css"/>" />
<!-- 当前页面样式 END -->
<script type="text/javascript"
	src="<c:url value="/js/jquery-1.3.2.js" />"></script>
<script type="text/javascript" src="<c:url value="/js/common.js" />"></script>
<script language="javascript" type="text/javascript"
	src="<c:url value="/js/My97DatePicker/WdatePicker.js"/>"></script>
<script type='text/javascript' src='<s:url value="/dwr/engine.js"/>'></script>
<script type='text/javascript'
	src='<s:url value="/dwr/interface/MccQuery.js"/>'></script>
<script type="text/javascript">
function exportSubmit(obj){
		var beginTime = $("#createatMin").val();
		var endTime = $("#createatMax").val(); 
		
		
		if((beginTime!=null && beginTime!="") ^ (endTime!=null&& endTime!="")){
			
				alert("时间选择错误！");
				return;
		}
		if((beginTime!=null && beginTime!="") && (endTime!=null&& endTime!="")){
			if(endTime<=beginTime){
				alert("结束时间不能小于开始时间");
				return false;
			}
		}
	
	$("#exportListForm").attr("action","<%=basePath%>/ysbMerinCheck/exportMerchantsChangeRecord.ct");
	$(obj).attr("disabled","true");
	$("#exportListForm").submit();
	
	
}
function   str2date(str){   
	  var   d=null;   
	  /* var   reg=/^(\d{4})(\d{2})(\d{2})$/  ; */
	  var    reg =/^(d{4})-(d{2})-(d{2}) (d{2}):(d{2}):(d{2})$/ ;
	  if(arr=str.match(reg))d=new   Date(Number(arr[1]),Number(arr[2])-1,Number(arr[3]),Number(arr[4]),Number(arr[5])) ; 
	  return   d;   
	  alert(d);
	  }
$(document).ready(function(){
	 function   str2date(str){   
		  var   d=null;   
		  var    reg =/^(d{4})-(d{2})-(d{2}) (d{2}):(d{2}):(d{2})$/ ;
		  if(arr=str.match(reg))d=new   Date(Number(arr[1]),Number(arr[2])-1,Number(arr[3]),Number(arr[4]),Number(arr[5])) ; 
		  return   d;   
		  } 
	$('#sub').click(function(){
 		var beginTime = $("#createatMin").val();
		var endTime = $("#createatMax").val(); 
		
		
		if((beginTime!=null && beginTime!="") ^ (endTime!=null&& endTime!="")){
			
				alert("时间选择错误！");
				return;
		}
		if((beginTime!=null && beginTime!="") && (endTime!=null&& endTime!="")){
			if(endTime<=beginTime){
				alert("结束时间不能小于开始时间");
				return false;
			}
		}
		
		
		$("#exportListForm").attr("action","<%=basePath%>/ysbMerinCheck/queryMerRecord.ct");
		$("#exportListForm").submit();
 		$(this).attr("disabled","true"); 
	});
	
});	
</script>
</head>
<body>
	<s:form id="exportListForm" action="/ysbMerinCheck/queryMerRecord.ct" method="post"
		theme="simple">
		<table class="tb"> 
			<tbody>
				<tr class="tb-line">
					<td class="tb-td" colspan="6"><div class="tb-h2">POS收单运营管理平台</div></td>
				</tr>
				<tr class="tb-line">
					<td class="tb-td" colspan="6"><div class="tb-h3">云商宝商户变更记录</div></td>
				</tr>
				

             <tr class="tb-line">
			 <td align="right" class="tb-td" style="width:110px;">
				        	<div class="tb-h4">商户号：</div>
			            </td>
             <td class="tb-td">
                <label class="tb-input-normal">
                <s:textfield id="mchtCd" name="searchCondition.mchtCd" cssClass="queryWidth" /></label>
            </td>						  
			   
             <td align="right" class="tb-td" style="width:110px;">
				        	<div class="tb-h4">姓名：</div>
			            </td>
            <td class="tb-td">
                <label class="tb-input-normal">
                <s:textfield id="nameOld" name="searchCondition.nameOld" cssClass="queryWidth" /></label>
            </td>						
		</tr>
             <tr class="tb-line">
			 <td align="right" class="tb-td" style="width:110px;">
				        	<div class="tb-h4">手机号：</div>
			            </td>
            <td class="tb-td">
                <label class="tb-input-normal">
                <s:textfield id="phoneNo" name="searchCondition.phoneNo" cssClass="queryWidth" /></label>
            </td>						
			   
             <td align="right" class="tb-td" style="width:110px;">
				        	<div class="tb-h4">原账户账号：</div>
			            </td>
             <td class="tb-td">
                <label class="tb-input-normal">
                <s:textfield id="accountNoOld" name="searchCondition.accountNoOld" cssClass="queryWidth" /></label>
               <!--  <code class="asterisk">*</code> -->
            </td>								
		</tr>
		    <tr class="tb-line">
            <td align="right" class="tb-td">变更时间：</td>
			<td class="tb-td" colspan="3">
			
			 <label class="tb-input-normal"><s:textfield id="createatMin"  name="searchCondition.createatMin" 
                onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',readOnly:true,wdate:true,errDealMode:0});" 
                /></label>
                
                 -<label class="tb-input-normal"><s:textfield id="createatMax"  name="searchCondition.createatMax" 
                onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',readOnly:true,wdate:true,errDealMode:0});" 
                /></label>
			</td>
        </tr>
		<tr class="tb-line">
           		 <td class="tb-td line-submit" align="right" colspan="7">
                <label class="tb-input-submit"><input type="button" value="查询" id="sub"/></label>
				<label class="tb-input-submit"><s:reset value="取 消" /></label> 
				<label class="tb-input-submit">
                    <s:if 
					 test="#request.mcrList != null && #request.mcrList.size>0">
					   		<input id="szPower" type="button"
							value="导 出" onclick="return exportSubmit(this);"/>
					   
					</s:if>
					<s:else>
					 	<input id="szPower" disabled="disabled" value="导  出" type="button" /> 
					</s:else>
                </label>
				</td>
				</tr>
					<s:if
					test="#request.mcrList != null && #request.mcrList.size>0">
					<tr class="tb-line">
						<td class="tb-td paging" colspan="7"><page:pageCount
								max_pages="11" totalPage="${requestScope.totalPage}"
								currentPage="${requestScope.currentPage}"
								action="${rootPath}/ysbMerinCheck/queryMerRecord.ct?currentPage=" />

						</td>
					</tr>
				</s:if>
			</table>
		<div class="big-tb">
    <table class="tb" style="width: 100%;">
				<thead>
            	<tr class="tb-line">
                <th class="tb-th" colspan="26"><div class="tb-h3">云商宝商户变更记录查询列表</div></th>
            	</tr>
					 <tr class="tb-line bg-gray">
					 <th class="tb-th">序号</th>	
					 <th class="tb-th">商户号</th>	
					 <th class="tb-th">姓名</th>
					 <th class="tb-th">手机号</th>
					  <th class="tb-th">原账户账号</th>
					  <th class="tb-th">原银行名称</th>
					  <th class="tb-th">原支行ID</th>
					  <th class="tb-th">新账户账号</th>
					  <th class="tb-th">新银行名称</th>
					  <th class="tb-th">新支行ID</th>
					  <th class="tb-th">变更时间</th>
					 
					</tr>
				</thead>
				<tbody>
					 	<s:iterator value="#request.mcrList" status="stat" id="mcr" >
							<tr class="tb-line" >
							<td class="tb-td"><s:property value="#stat.count"/></td>
							<td class="tb-td"><s:property value="#mcr.mchtCd"/></td>
							<td class="tb-td"><s:property value="#mcr.nameOld"/></td>
							<td class="tb-td"><s:property value="#mcr.phoneNo"/></td>
							<td class="tb-td"><s:property value="#mcr.accountNoOld"/></td>
							<td class="tb-td"><s:property value="#mcr.bankNameOld"/></td>
							<td class="tb-td"><s:property value="#mcr.bankIdOld"/></td>
							<td class="tb-td"><s:property value="#mcr.accountNoNew"/></td>
							<td class="tb-td"><s:property value="#mcr.bankNameNew"/></td>
							<td class="tb-td"><s:property value="#mcr.bankIdNew"/></td>
							<td class="tb-td"><s:property value="#mcr.createat"/></td>
							
						</s:iterator>
				</tbody>
			</table>
			</div>
		</s:form>
	<s:if test="#request.info_request !=null">
	<script language="javascript">
	    alert("${request.info_request}");
	    </script>
	</s:if>	
</body>
</html>
